package com.wjm.util;

import java.util.List;
import java.util.Map;
import java.util.Properties;

import com.wjm.entity.Building;
import com.wjm.entity.Classroom;
import com.wjm.entity.Desk;
import com.wjm.entity.Record;
import com.wjm.entity.StuRecInfo;

public class CacheUtil {
	/**
	 * 缓存的资源文件对象
	 */
	private static Properties properties;

	/**
	 * 缓存所有教学楼 key：教学楼id
	 */
	private static Map<Integer,Building> buildings;
	/**
	 * 缓存的有可用座位的教室 key：教学楼id
	 */
	private static Map<Integer, List<Classroom>> useroom;

	/**
	 * 缓存的无可用座位的教室 key：教学楼id
	 */
	private static Map<Integer, List<Classroom>> unuseroom;

	/**
	 * 缓存的座位信息 key：教室id
	 */
	private static Map<Integer, List<Desk>> desks;
	
	/**
	 * 缓存的当前预约信息 key：座位id
	 */
	private static Map<Integer, Record> records;
	
	/**
	 * 缓存的当天取消预约和是否预约的信息 key：学号
	 */
	private static Map<String, StuRecInfo> stuRecInfos;
	

	public static Properties getProperties() {
		return properties;
	}

	public static void setProperties(Properties properties) {
		CacheUtil.properties = properties;
	}

	public static Map<Integer, Building> getBuildings() {
		return buildings;
	}

	public static void setBuildings(Map<Integer, Building> buildings) {
		CacheUtil.buildings = buildings;
	}

	public static Map<Integer, List<Classroom>> getUseroom() {
		return useroom;
	}

	public static void setUseroom(Map<Integer, List<Classroom>> useroom) {
		CacheUtil.useroom = useroom;
	}

	public static Map<Integer, List<Classroom>> getUnuseroom() {
		return unuseroom;
	}

	public static void setUnuseroom(Map<Integer, List<Classroom>> unuseroom) {
		CacheUtil.unuseroom = unuseroom;
	}

	public static Map<Integer, List<Desk>> getDesks() {
		return desks;
	}

	public static void setDesks(Map<Integer, List<Desk>> desks) {
		CacheUtil.desks = desks;
	}

	public static Map<Integer, Record> getRecords() {
		return records;
	}

	public static void setRecords(Map<Integer, Record> records) {
		CacheUtil.records = records;
	}

	public static Map<String, StuRecInfo> getStuRecInfos() {
		return stuRecInfos;
	}

	public static void setStuRecInfos(Map<String, StuRecInfo> stuRecInfos) {
		CacheUtil.stuRecInfos = stuRecInfos;
	}

}
